<template>
    <div class="background" v-if="isShow">
        <p class="text">
            <b>
                <img src="../assets/images/position_image/loading.gif" alt="加载中...">
            </b>
        </p>
    </div>
</template>

<script>
    export default {
        name: 'loading',
        computed : {
            isShow(){
                return this.$store.state.loadingShow
            }
        }
    }
</script>

<style lang="scss" type="text/scss" scoped>
    .background {
        background: rgba(80, 85, 85, 0.4);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 99999;
        width: 100vw;
        height: 100vh;
        .text {
            text-align: center;
            margin-top: 45vh;
            b {
                padding: 10px 20px;
            }
        }
    }
</style>
